<template>
  <div>
  <div class="my_header">我的</div>

  <div class="mycard">
    <router-link class="avatar-container" to="/login">
      <img src="@/assets/img/l_tx.png" alt="用户头像" />
      <span style="margin-left: 10px; color:black">登录</span>
    </router-link>
    <div class="features-container">
      <router-link class="feature-item" to="/member">
        <img src="@/assets/img/l_vip.png" alt="" />
        <div>会员充值</div>
      </router-link>

      <div style="border: 1px #ededed solid; margin-bottom: 5px"></div>

      <router-link class="feature-item" to="/redbag">
        <img src="@/assets/img/l_money.png" alt="" />
        <div>红包卡券</div>
      </router-link>
    </div>
  </div>

  <div class="cell-box">
      <van-cell title="我的地址" is-link to="/introduct" />
      <van-cell title="常见问题" is-link to="/question" />
      <van-cell title="用户协议" is-link to="/agreement" />
      <van-cell title="关于我们" is-link to="/about" />
      <van-cell title="联系店长" is-link to="/contact" />
      <van-cell title="修改密码" is-link to="/revise" />
    </div>
  </div>

</template>
<style lang="less" scoped>
.my_header {
  color: #ffffff;
  margin: 0 auto;
  padding: 50px;
  text-align: center;
  height: 300px;
  font-size: 30px;
  background-color: #00a299;
}

/deep/ .my .van-nav-bar__title {
  color: #ffffff;
  font-weight: 500;
}

/deep/ .my .van-nav-bar__content {
  background-color: #00a299;
}

.main {
  margin: 0;
}

.home,
.my {
  margin: 0 18px;
}

.cell-box {
  margin: 0 auto;
  width: 90%;
  border: 1px solid #efefef;
  border-radius: 20px;
  margin-top: 140px;
}

/deep/ .item .van-grid-item__content {
  flex-direction: row;
}

.mycard {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid #efefef;
}

.avatar-container {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #ededed;
}

.avatar-container img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  padding: 20px 10px;
}

.features-container {
  display: flex;
  justify-content: space-between;
  padding: 15px 60px;
}
.features-container a {
  color: black;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  margin: 0 40px;
}

.feature-item img {
  width: 70px;
  height: 70px;
  margin-bottom: 10px;
}
</style>

<script>
import router from "@/router";
import { ref } from "vue";
export default {
  setup() {
    const username = ref("登录");
    return {
      username,
    };
  },
  methods: {
    vip() {
      router.push("/vip");
    },
  },
};
</script>